package com.celan.task.standard;

/**
 * @author Celan
 * @description 异步任务详情
 */
public class AsyncTaskDetail<T> {
    // 任务id
    private String taskId;

    // 任务状态
    private String taskStatus;

    // 任务结果
    private T taskResult;

    // 错误码
    private int errorCode;

    public void setTaskId(String taskId) {
        this.taskId = taskId;
    }

    public String getTaskId() {
        return taskId;
    }

    public void setTaskStatus(String taskStatus) {
        this.taskStatus = taskStatus;
    }

    public String getTaskStatus() {
        return taskStatus;
    }

    public void setTaskResult(T taskResult) {
        this.taskResult = taskResult;
    }

    public Object getTaskResult() {
        return taskResult;
    }

    public int getErrorCode() {
        return errorCode;
    }

    public void setErrorCode(int errorCode) {
        this.errorCode = errorCode;
    }

    @Override
    public String toString() {
        return "\ntask_id: " + this.getTaskId() + "\ntask_status: " + this.getTaskStatus()+ "\ntask_result: " + this.getTaskResult();
    }
}
